package com.sf.fy.uav.applet;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.retry.annotation.EnableRetry;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.web.client.RestTemplate;

/**
 * @author LTQ
 */
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class, org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration.class}, scanBasePackages = {"com.sf.fy.uav", "com.sf.fy.global"})
@MapperScan("com.sf.fy.uav.*.mapper")
@EnableRedisHttpSession(maxInactiveIntervalInSeconds = 3600)
@EnableScheduling
@EnableRetry
@EnableDiscoveryClient
@EnableFeignClients(basePackages = {"com.sf.fy.uav.applet"})
public class MonthlySettlementPlatformApplication {

    public static void main(String[] args) {
        SpringApplication.run(MonthlySettlementPlatformApplication.class, args);
    }

    @Bean
    public RestTemplate restTemplate(RestTemplateBuilder builder) {
        return builder.build();
    }


}
